主题
注册到后台 - Reg
函数简介
调用此函数来注册,从而使用插件的高级功能。推荐使用此函数。多个OLA对象仅需要注册一次。
接口名称
RegDLL调用
int Reg(string userCode, string softCode, string featureList);参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| userCode | 字符串 | 用户码。 |
| softCode | 字符串 | 软件码。 |
| featureList | 字符串 | 功能列表。如OLA、YOLO等,多个特性用 | 分割,如使用YOLO功能 OLA|YOLO。 |
示例
SDK 调用
cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
int ret = ola.Reg("value", "value", "value");csharp
using OLAPlug;
var ola = new OLAPlugServer();
int ret = ola.Reg("value", "value", "value");python
from OLAPlugServer import OLAPlugServer
ola = OLAPlugServer()
ret = ola.Reg("value", "value", "value")java
import com.olaplug.OLAPlugServer;
OLAPlugServer ola = new OLAPlugServer();
int ret = ola.Reg("value", "value", "value");cpp
var ola = com("OlaPlug.OlaSoft")
var ret = ola.Reg("value", "value", "value")vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
ret = ola.Reg("value", "value", "value")text
.局部变量 ola, OLAPlug
ola.创建 ()
ret = ola.Reg(“value”, “value”, “value”)aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var ret = ola.Reg("value", "value", "value");text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
整数 ret = ola.Reg("value", "value", "value")cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
int32_t ret = ola.Reg("value", "value", "value");原生 DLL 调用
cpp
Reg(instance, "value", "value", "value");csharp
using System.Runtime.InteropServices;
using System.Text;
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern int Reg(string userCode, string softCode, string featureList);
Reg(instance, "value", "value", "value");python
from ctypes import CDLL, c_int, c_int64, create_string_buffer
ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
ola.Reg(instance, "value", "value", "value")返回值
| 返回值 | 说明 |
|---|---|
1 | 成功。 |
0 | 失败。 |
注意事项
| 项目 | 说明 |
|---|---|
| 多个OLA对象仅需要注册一次 | 多个OLA对象仅需要注册一次。 |
